#include "label.h"

#include <QDebug>
#include <QMouseEvent>
Label::Label(QWidget* parent) : QLabel(parent)
{

}

void Label::mousePressEvent(QMouseEvent *event)
{
    qDebug() << event->x() << ", " << event->y();
}

void Label::mouseReleaseEvent(QMouseEvent *event)
{
    if(event->button() == Qt::LeftButton)
    {
        qDebug() << "释放左键";
    }
    else if (event->button() == Qt::RightButton)
    {
        qDebug() << "释放右键";
    }
}
